package com.demo.spring.aware;

import org.springframework.beans.factory.BeanClassLoaderAware;
import org.springframework.stereotype.Component;

/**BeanClassLoaderAware回调接口可让受管Bean本身知道它是由哪一类装载器负责装载的
 *
 */
@Component
public class MyBeanClassLoaderAware implements BeanClassLoaderAware {

	@Override
	public void setBeanClassLoader(ClassLoader paramClassLoader) {
		System.out.println("set classLoader: " + paramClassLoader);
	}

}